<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center organizationalDetails_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub organizationalDetails_fd0_0'>
          <view class='flex flex-wrap align-center organizationalDetails_fd0_0_c0' @tap.stop="handleJumpDiy"
            data-type="back" data-url="1">
            <text class='fu-iconfont2  organizationalDetails_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='organizationalDetails_fd0_0_c1_c0'>详情</text>
          </view>
          <view class='flex flex-wrap align-center justify-end organizationalDetails_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout organizationalDetails_flex_1">
        <view class='flex flex-direction flex-wrap align-stretch organizationalDetails_fd1_0'>
          <view class='flex align-center justify-between'>
            <view class='flex flex-wrap align-center' @tap.stop="goHome" data-type="navigateTo"
              :data-url="`/pages/wode/myFans/userHome?uid=${organizationalDetails.user_id}`">
              <image class='organizationalDetails_fd1_0_c0_c0_c0' mode="aspectFit" :src='organizationalDetails.avatar'>
              </image>
              <view class='flex flex-direction flex-wrap align-start' style="width: 300rpx;">
                <text class='organizationalDetails_fd1_0_c0_c0_c1_c0'>{{organizationalDetails.user_nickname}}</text>
                <!-- <text class='organizationalDetails_fd1_0_c1_c0 margin-top-sm'>{{organizationalDetails.title}}</text> -->
                <view class='flex flex-wrap align-center organizationalDetails_fd1_0_c0_c0_c1_c1'>
                  <view class='organizationalDetails_fd1_0_c0_c0_c1_c1_c0' style="width:500rpx">
                    {{organizationalDetails.create_time}}
                    <text class="margin-left-xs">来自{{organizationalDetails.user_school}}</text>
                  </view>
                  <!-- <view class='text-cut organizationalDetails_fd1_0_c0_c0_c1_c1_c1' style="width:350rpx;">
                    来自{{organizationalDetails.user_school}}
                  </view> -->
                </view>
              </view>
            </view>

            <view v-if="isLogin && (userInfo.id!=organizationalDetails.user_id)">
              <button class='organizationalDetails_fd1_0_c0_c1' v-if=" organizationalDetails.is_follow==0"
                @tap.stop="clickArticleFunc(organizationalDetails.is_follow)">关注</button>
              <button class='organizationalDetails_fd1_0_c0_c1s' v-if=" organizationalDetails.is_follow==1"
                @tap.stop="clickArticleFunc(organizationalDetails.is_follow)">已关注</button>
            </view>
            <button v-if="isLogin && (userInfo.id==organizationalDetails.user_id)"
              class='organizationalDetails_fd1_0_c0_c1' @tap.stop="handleJumpDiy" data-type="navigateTo"
              :data-url="`/pages/fabu/groupBureau/groupBureau?aid=${aid}`">编辑</button>

          </view>
          <!-- <view class='flex flex-wrap align-center organizationalDetails_fd1_0_c0_c0_c1_c1' style="margin-top:16rpx">
            <text class='organizationalDetails_fd1_0_c0_c0_c1_c1_c0'>{{organizationalDetails.create_time}}</text>
            <view class='text-cut organizationalDetails_fd1_0_c0_c0_c1_c1_c1' style="width:350rpx;">
              来自{{organizationalDetails.user_school}}
            </view>
          </view> -->
          <view class='flex flex-wrap align-center organizationalDetails_fd1_0_c1'>
            <text class='organizationalDetails_fd1_0_c1_c0'>{{organizationalDetails.title}}</text>
          </view>
          <view class='flex flex-wrap align-center organizationalDetails_fd1_0_c2'>
            <view class='flex flex-wrap align-center organizationalDetails_fd1_0_c2_c0'>
              <text
                class='organizationalDetails_fd1_0_c2_c0_c0'>{{organizationalDetails.postofficecate_cate_name}}</text>
            </view>
          </view>
          <view class='flex  align-center margin-tb-sm'>
            <!-- <view class='flex flex-wrap align-center organizationalDetails_fd1_0_c2_c0'>
              <text
                class='organizationalDetails_fd1_0_c2_c0_c0'>{{organizationalDetails.postofficecate_cate_name}}</text>
            </view> -->
            <view class=' text-df text-333'>{{organizationalDetails.content}}</view>
          </view>
          <view class='flex flex-direction flex-wrap align-stretch organizationalDetails_fd1_0_c3'>
            <!-- <view class='flex flex-wrap align-center'>
              <text class='organizationalDetails_fd1_0_c3_c0_c0'>缺1男，1女</text>
            </view> -->
            <view class='flex flex-wrap align-center organizationalDetails_fd1_0_c3_c1'>
              <view class='flex flex-wrap align-center'>
                <image class='organizationalDetails_fd1_0_c3_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"27.png"'>
                </image>
                <text class='organizationalDetails_fd1_0_c3_c1_c0_c1'>{{organizationalDetails.office_time}}</text>
              </view>
            </view>
            <view class='flex align-center justify-between organizationalDetails_fd1_0_c3_c2'>
              <view class='flex  align-center'>
                <image class='organizationalDetails_fd1_0_c3_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"29.png"'>
                </image>
                <view class='text-cut-2 organizationalDetails_fd1_0_c3_c1_c0_c1' style="width:420rpx;">
                  {{organizationalDetails.address || '待定'}}
                </view>
              </view>
              <!--  -->
              <view class='flex flex-wrap align-center'>
                <view class='organizationalDetails_fd1_0_c0_c0_c1_c1_c0' v-if="organizationalDetails.distance"
                  style="text-align: right !important;">
                  {{organizationalDetails.distance || 0}}
                </view>
                <!-- <text class='organizationalDetails_fd1_0_c0_c0_c1_c1_c0' v-else></text> -->
              </view>
            </view>
            <view class="flex justify-between align-center" style="margin-top: 16rpx;">
              <view class='flex align-center'>
                <image class='organizationalDetails_fd1_0_c3_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"30.png"'>
                </image>
                <view class='organizationalDetails_fd1_0_c3_c1_c0_c1'>{{organizationalDetails.people_num}}人局 |
                  差{{organizationalDetails.need_people}}人</view>
                <text class='organizationalDetails_fd1_0_c3_c1_c0_c1 margin-left-sm' style="color: #6450eb;"
                  @tap.stop="handleJumpDiy" data-type="navigateTo"
                  :data-url="`/pages/wode/participationRecord/participationRecord?aid=${organizationalDetails.aid}`"
                  v-if=" organizationalDetails.is_apply==0">瞧瞧都有谁？</text>
              </view>
              <view class='organizationalDetails_fd1_0_c0_c0_c1_c1_c0'>{{organizationalDetails.know}}</view>
            </view>
            <view class='flex flex-wrap align-center organizationalDetails_fd1_0_c3_c2'>
              <view class='flex flex-wrap align-center'>
                <image class='organizationalDetails_fd1_0_c3_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"28.png"'>
                </image>
                <text class='organizationalDetails_fd1_0_c3_c1_c0_c1'>人均费用：</text>
                <!-- <text class='organizationalDetails_fd1_0_c3_c1_c0_c1'>$</text> -->
                <text class='organizationalDetails_fd1_0_c3_c1_c0_c1'>{{organizationalDetails.money}}</text>
              </view>
            </view>
          </view>
          <view class='flex flex-wrap align-center justify-center organizationalDetails_fd1_0_c1'
            @click.stop="officeapply" v-if="isLogin && (userInfo.id!=organizationalDetails.user_id)">
            <view class="" v-if="organizationalDetails.is_over==0">
              <button class='organizationalDetails_fd1_0_c4_c0' v-if="organizationalDetails.is_apply==0">报名参加</button>
              <button @tap.stop="handleJumpDiy" data-type="navigateTo"
                :data-url="`/pages/wode/participationRecord/participationRecord?aid=${organizationalDetails.aid}`"
                class='organizationalDetails_fd1_0_c4_c0s_can'
                v-if="organizationalDetails.is_apply==1">参与列表（审核中）</button>
              <button @tap.stop="handleJumpDiy" data-type="navigateTo"
                :data-url="`/pages/wode/participationRecord/participationRecord?aid=${organizationalDetails.aid}`"
                class='organizationalDetails_fd1_0_c4_c0s_can' v-if="organizationalDetails.is_apply==2">参与列表</button>
              <button class='organizationalDetails_fd1_0_c4_c0s' v-if="organizationalDetails.is_apply==4">已取消</button>
            </view>


            <button class='organizationalDetails_fd1_0_c4_c0s' v-else>已结束</button>
          </view>
          <view class='flex flex-wrap align-center justify-center organizationalDetails_fd1_0_c1'
            @click.stop="handleJumpDiy" data-type="navigateTo"
            :data-url="`/pages/wode/participationRecord/participationRecord?aid=${aid}`"
            v-if="isLogin && (userInfo.id==organizationalDetails.user_id) ">
            <button class='organizationalDetails_fd1_0_c4_c0s_can'>参与列表</button>
          </view>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout organizationalDetails_flex_2">
        <view class='flex flex-wrap align-center'>
          <text class='organizationalDetails_fd2_0_c0'>共</text>
          <text class='organizationalDetails_fd2_0_c0'>{{organizationalDetails.comment_number}}</text>
          <text class='organizationalDetails_fd2_0_c0'>条评论</text>
        </view>
        <template v-for='(item,key0) in commentList'>
          <view class='flex flex-wrap align-start organizationalDetails_fd2_1' :key='key0'
            @click.stop="goChilder(item.user_id)">
            <image class='organizationalDetails_fd2_1_c0' mode="aspectFit" :src='item.avatar'></image>
            <view class='flex flex-direction flex-wrap align-stretch flex-sub'>
              <view class='flex flex-wrap align-center'>
                <text class='organizationalDetails_fd2_1_c1_c0_c0'>{{item.user_nickname}}</text>
                <!-- <text class='organizationalDetails_fd2_1_c1_c0_c1'>1号</text> -->
              </view>
              <view class='flex flex-wrap align-center organizationalDetails_fd2_1_c1_c1'>
                <text class='organizationalDetails_fd2_1_c1_c1_c0'>来自</text>
                <text class='organizationalDetails_fd2_1_c1_c1_c1'>{{item.user_school}}</text>
              </view>
              <view class='flex flex-wrap align-center organizationalDetails_fd2_1_c1_c2'>
                <text class='organizationalDetails_fd2_1_c1_c2_c0'>{{item.content}}</text>
              </view>
              <view class='flex flex-wrap align-center justify-between organizationalDetails_fd2_1_c1_c2'>
                <text class='organizationalDetails_fd2_1_c1_c1_c1'>{{item.create_time}}</text>
                <view class='flex flex-wrap align-center'>
                  <view class='flex flex-wrap align-center' @click.stop="replayShow(item)">
                    <image class='organizationalDetails_fd2_1_c1_c3_c1_c0_c0' mode="aspectFit"
                      :src='STATIC_URL+"67.png"'></image>
                    <text class='organizationalDetails_fd2_1_c1_c3_c1_c0_c1'>{{item.countNum}}</text>
                  </view>
                </view>
              </view>
              <view class='flex flex-wrap align-center organizationalDetails_fd2_1_c1_c4'>
                <template v-for='(child,key1) in item.son_info'>
                  <view class='flex flex-wrap align-start organizationalDetails_fd2_1'
                    @click.stop="goChilder(child.user_id)" :key='key1'>
                    <image class='organizationalDetails_fd2_1_c0' mode="aspectFit" :src='child.avatar'></image>
                    <view class='flex flex-direction flex-wrap align-stretch flex-sub'>
                      <view class='flex flex-wrap align-center'>
                        <text class='organizationalDetails_fd2_1_c1_c0_c0'>{{child.user_nickname}}</text>
                        <!-- <text class='organizationalDetails_fd2_1_c1_c4_c0_c1_c0_c1'>作者</text> -->
                        <!-- <image class='organizationalDetails_fd2_1_c1_c4_c0_c1_c0_c2' mode="aspectFit"
                          :src='STATIC_URL+"75.png"'></image> -->
                      </view>
                      <view class='flex flex-wrap align-center organizationalDetails_fd2_1_c1_c1'
                        v-if="child.user_school">
                        <text class='organizationalDetails_fd2_1_c1_c1_c0'>来自</text>
                        <text class='organizationalDetails_fd2_1_c1_c1_c1'>{{child.user_school}}</text>
                      </view>
                      <view class='flex flex-wrap align-center organizationalDetails_fd2_1_c1_c2'>
                        <text class='organizationalDetails_fd2_1_c1_c2_c0'>{{child.content}}</text>
                      </view>
                      <view class='flex flex-wrap align-center justify-between organizationalDetails_fd2_1_c1_c2'>
                        <text class='organizationalDetails_fd2_1_c1_c1_c1'>{{child.create_time}}</text>
                        <!-- <view class='flex flex-wrap align-center'>
                          <view class='flex flex-wrap align-center'>
                            <image class='organizationalDetails_fd2_1_c1_c3_c1_c0_c0' mode="aspectFit"
                              :src='STATIC_URL+"67.png"'></image>
                            <text class='organizationalDetails_fd2_1_c1_c3_c1_c0_c1'>322</text>
                          </view>
                        </view> -->
                      </view>
                    </view>
                  </view>
                </template>

              </view>
              <!-- <view class='flex flex-wrap align-center organizationalDetails_fd2_1'>

                <view class='flex  organizationalDetails_fd2_1_c1_c5_c0'></view>

                <text class='organizationalDetails_fd2_1_c1_c5_c1'>展开</text>
                <text class='organizationalDetails_fd2_1_c1_c5_c1'>2</text>
                <text class='organizationalDetails_fd2_1_c1_c5_c1'>条回复</text>
                <image class='organizationalDetails_fd2_1_c1_c5_c4' mode="aspectFit" :src='STATIC_URL+"68.png"'></image>
              </view> -->
            </view>
          </view>
        </template>
        <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
          :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
      </view>

      <!---flex布局flex布局结束-->
      <benben-popup v-model="popupShow1704966922126" :mask="true" :mask-close-able="false" mode='center' :z-index='999'>
        <!---flex布局flex布局开始-->
        <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout organizationalDetails_flex_3">
          <view class='flex flex-direction flex-wrap align-stretch'>
            <view class='flex flex-wrap align-center justify-center'>
              <image class='organizationalDetails_fd3_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"5.png"'></image>
            </view>
            <view class='flex flex-direction flex-wrap align-center'>
              <text class='organizationalDetails_fd3_0_c1_c0'>已报名</text>
              <text class='organizationalDetails_fd3_0_c1_c1'>等待组局者审核</text>
            </view>
            <view class='flex flex-wrap align-center justify-center organizationalDetails_fd3_0_c2'>
              <text class='organizationalDetails_fd3_0_c2_c0' @click.stop="popupShow1704966922126=false">我知道了</text>
            </view>
          </view>
        </view>

        <!---flex布局flex布局结束-->

      </benben-popup>
      <benben-popup v-model="popupShow1704966632586" :mask="true" :mask-close-able="true" mode='center' :z-index='999'>
        <!---取消参加flex布局开始-->
        <view class="flex benben-flex-layout flex-wrap align-center">
          <view class='flex flex-direction flex-wrap align-center organizationalDetails_fd4_0'>
            <text class='organizationalDetails_fd4_0_c0'>提示</text>
            <text class='organizationalDetails_fd4_0_c1'>取消后不能再次报名，确定取消
              参加吗？</text>
            <view class='flex align-center organizationalDetails_fd4_0_c2'>
              <button class='organizationalDetails_fd4_0_c2_c0'>取消</button>
              <button class='organizationalDetails_fd4_0_c2_c1'>确认</button>
            </view>
          </view>
        </view>

        <!---取消参加flex布局结束-->

      </benben-popup>
      <view
        class="flex flex-direction flex-wrap align-stretch benben-position-layout flex organizationalDetails_flex_5">
        <view class='flex flex-wrap align-center justify-between flex-sub organizationalDetails_fd5_0'>
          <view class='flex flex-wrap align-center flex-sub organizationalDetails_fd5_0_c0'>
            <benben-input type="text" :placeholder="palcetile" confirm-type="done" :focus="isfocus" :maxlength="-1"
              @focus="handleFocus" placeholder-style="color:rgba(191, 191, 191, 1);font-size:28rpx" v-model="content"
              @confirm="commentAnswerFunc()" />
          </view>
          <view class="text-df text-white btnssss" @click.stop="commentAnswerFunc()" v-if="isfocus">发送</view>
          <view class='flex flex-wrap align-center' v-if="!isfocus">
            <view class='flex flex-direction flex-wrap align-center organizationalDetails_fd5_0_c1_c0'
              @click.stop="collection(organizationalDetails.is_collection)">
              <image class='organizationalDetails_fd5_0_c1_c0_c0' mode="aspectFit"
                v-if="organizationalDetails.is_collection==0" :src='STATIC_URL+"66.png"'></image>
              <image class='organizationalDetails_fd5_0_c1_c0_c0' mode="aspectFit" v-else :src='STATIC_URL+"118.png"'>
              </image>
              <text class='organizationalDetails_fd5_0_c1_c0_c1'>{{organizationalDetails.collection_number}}</text>
            </view>
            <view class='flex flex-direction flex-wrap align-center' @click.stop="popupShow1704178252726=true">
              <image class='organizationalDetails_fd5_0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"74.png"'></image>
              <text class='organizationalDetails_fd5_0_c1_c0_c1'>{{organizationalDetails.share_num}}</text>
            </view>
          </view>
        </view>

      </view>
      <!--      <view class="flex upload">
        <view class="upload_am" @click.stop="upload('andior')">安卓下载</view>
        <view class="upload_ios" @click.stop="upload('ios')">ios下载</view>
      </view> -->
      <view :style="{height: '98rpx'}"></view>

      <benben-popup v-model="popupShow1704178252726" :mask="true" :mask-close-able="false" mode='bottom' :z-index='999'>
        <!---分享flex布局开始-->
        <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
          <view class='flex flex-direction flex-wrap align-stretch postquestionsDetails_fd3_0'>
            <view class='flex flex-wrap align-center justify-between postquestionsDetails_fd3_0_c0'>
              <view class='flex flex-wrap align-center postquestionsDetails_fd3_0_c0_c0'>
              </view>
              <view class='flex flex-wrap align-center justify-center postquestionsDetails_fd3_0_c0_c1'>
                <text class='postquestionsDetails_fd3_0_c0_c1_c0'>更多</text>
              </view>
              <view class='flex flex-wrap align-center postquestionsDetails_fd3_0_c0_c2'>
                <image class='postquestionsDetails_fd3_0_c0_c2_c0' mode="aspectFit" :src='STATIC_URL+"69.png"'
                  @tap.stop="popupShow1704178252726=false"></image>
              </view>
            </view>
            <view class='flex flex-wrap align-center justify-around postquestionsDetails_fd3_0_c1'>
              <view class='flex flex-direction flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo"
                :data-url="`/pages/shouye/selectFriends/selectFriends?postoffice_id=${aid}`">
                <image class='postquestionsDetails_fd3_0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"72.png"'></image>
                <text class='postquestionsDetails_fd3_0_c1_c0_c1'>私信好友</text>
              </view>
              <view class='flex flex-direction flex-wrap align-center' @click="shareApp">
                <image class='postquestionsDetails_fd3_0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"71.png"'></image>
                <text class='postquestionsDetails_fd3_0_c1_c0_c1'>微信好友</text>
              </view>
              <!--     <view class='flex flex-direction flex-wrap align-center'
                v-if="isLogin && (organizationalDetails.user_id!=userInfo.id)" @tap="handleJumpDiy"
                data-type="navigateTo"
                :data-url="`/pages/shouye/complainData/complainData?type=1&organizational_id=${organizationalDetails.aid}`">
                <image class='postquestionsDetails_fd3_0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"70.png"'></image>
                <text class='postquestionsDetails_fd3_0_c1_c0_c1'>投诉</text>
              </view>
              <view class='flex flex-direction flex-wrap align-center'
                v-if="isLogin && (organizationalDetails.user_id==userInfo.id)" @click.stop="delpostdetail">
                <image class='postquestionsDetails_fd3_0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"90.png"'></image>
                <text class='postquestionsDetails_fd3_0_c1_c0_c1'>删除</text>
              </view> -->
            </view>
          </view>
        </view>

        <!---分享flex布局结束-->

      </benben-popup>
    </view>
  </view>
</template>
<script>
  import pagingList from '@/common/mixin/paging_list.js';
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        popupShow1704178252726: false,
        "popupShow1704966632586": false,
        "popupShow1704966922126": false,
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        "organizationalDetails": {
          "aid": "",
          "user_nickname": "",
          "postofficecate_cate_name": "",
          "title": "",
          "content": "",
          "people_num": "",
          "money": "",
          "office_time": "",
          "collection_number": "",
          "comment_number": "",
          "address": "",
          "lng": "",
          "lat": "",
          "share_num": "",
          "user_id": "",
          "avatar": "",
          "distance": "",
          "user_school": "",
          "is_collection": "",
          "is_apply": "",
          "know": "",
          "need_people": ""
        },
        "commentList": [],
        "aid": "1",
        palcetile: '请输入',
        hufiuId: '',
        pid: '0',
        content: '',
        isfocus: false,
        latitude: "",
        longitude: '',
        address: {
          latitude: '',
          longitude: '',
          city: ''
        },
        goodle_store_url: '',
        ios_store_url: ""
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },
      isLogin() {
        return this.$store.state.token == '' ? false : true;
      },
      userInfo: {
        get() {
          return this.$store.state.userInfo.userinfo
        },
        set() {
          this.$store.commit('updateUserInfo', value)
        },
      },
    },
    watch: {},
    onLoad(options) {
      let {
        aid,
        latitude,
        longitude
      } = options
      if (aid !== undefined) this.aid = aid
      if (latitude !== undefined) this.latitude = latitude
      if (longitude !== undefined) this.longitude = longitude
      let that = this

      that.getcommentListFunc()
      uni.onKeyboardHeightChange((res) => {
        // this.keyboardHeight = res.height;
        if (res.height > 0) {
          console.log('键盘已经开启');
          this.isfocus = true
          // 在这里执行键盘开启时需要进行的操作
        } else {
          console.log('键盘已经关闭');
          this.isfocus = false
          this.palcetile = '说点什么'
          this.hufiuId = ''
          this.pid = 0
          // 在这里执行键盘关闭时需要进行的操作
        }
      });
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.$api.post(global.apiUrls.post657aca7c1f84b, {

      }).then(res => {
        if (res.data.code == 1) {
          this.ios_store_url = res.data.data.ios_store_url
          this.goodle_store_url = res.data.data.goodle_store_url
        }
      })
      let that = this

      // #ifdef APP
      if (uni.getStorageSync('gugeaddress')) {
        that.address.latitude = uni.getStorageSync("gugeaddress").latitude
        that.address.longitude = uni.getStorageSync("gugeaddress").longitude
        that.address.city = uni.getStorageSync("gugeaddress").addresstxt
        that.getdetailsFunc()
      } else {
        uni.getLocation({
          type: 'wgs84',
          // #ifdef APP
          geocode: true,
          // #endif
          isHighAccuracy: true,
          success: adr => {
            console.log('adradradradr', adr)
            const obj = {
              latitude: adr.latitude,
              longitude: adr.longitude,
              addresstxt: ''
            }
            uni.setStorageSync('gugeaddress', obj)
            that.address = uni.getStorageSync('gugeaddress')
            that.getdetailsFunc()
          },
          fail: fail => {
            that.$message.info(JSON.stringify(complete))
            console.log('complete', complete)
          }
        })
      }
      // #endif

      // #ifdef H5
      console.log('3333333')
      that.getdetailsFunc()
      // #endif
    },
    onHide() {
      this.popupShow1704178252726 = false
    },
    onResize() {

    },
    onPullDownRefresh() {
      this.getcommentListFunc()
    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      upload(type) {
        if (type == 'andior') {
          window.location.href = this.goodle_store_url
        } else {
          window.location.href = this.ios_store_url
        }
      },
      goChilder(uid) {

        if (uid == this.userInfo.id) {
          uni.switchTab({
            url: `/pages/tabBar/myPosts/myPosts`
          })
        } else {
          uni.navigateTo({
            url: `/pages/wode/myFans/userHome?uid=${uid}`
          })
        }
      },
      goHome() {

        if (this.organizationalDetails.is_nm != 1) {
          if (this.organizationalDetails.user_id == this.userInfo.id) {
            uni.switchTab({
              url: `/pages/tabBar/myPosts/myPosts`
            })
          } else {
            uni.navigateTo({
              url: `/pages/wode/myFans/userHome?uid=${this.organizationalDetails.user_id}`
            })
          }
        }
      },
      shareApp() {
        let that = this
        uni.share({
          provider: 'weixin',
          scene: 'WXSceneSession',
          imageUrl: this.organizationalDetails.share_img,
          title: this.organizationalDetails.title,
          href: this.organizationalDetails.share_url,
          summary: this.organizationalDetails.share_content,
          success: function(res) {
            console.log('22222')
            // uni.showToast({
            //   title: '分享成功',
            //   icon: 'none'
            // })
            that.$api.post(global.apiUrls.post66274e855d168, {
              office_id: that.aid
            });
            that.organizationalDetails.share_num = that.organizationalDetails.share_num + 1
            console.log("success:" + JSON.stringify(res));
          },
          fail: function(err) {
            this.$message.info('分享失败')
            console.log("fail:" + JSON.stringify(err));
          }
        });
      },
      officeapply() {
        let urls = ''
        if (this.organizationalDetails.is_apply == 1) {
          urls = global.apiUrls.post657a60c34225e
        } else {
          urls = global.apiUrls.post6579855b6a404
        }
        this.$api.post(urls, {
          postoffice_id: this.organizationalDetails.aid
        }).then(res => {
          if (res.data.code == 1) {
            if (this.organizationalDetails.is_apply == 0) {
              this.popupShow1704966922126 = true
            }
            this.getdetailsFunc()
          } else {
            this.$message.info(res.data.msg)
          }
        })
      },
      //评论回答
      replayShow(item) {

        this.palcetile = `回复${item.user_nickname}`
        this.hufiuId = item.aid
        this.pid = item.aid
        this.isfocus = true
        console.log('pid', this.pid)
      },
      // handleBlur() {
      //   this.isfocus = false
      // },
      handleFocus() {
        this.isfocus = true
      },
      async commentAnswerFunc() {
        //请求方法
        //数据验证

        let data657914e009af0 = await this.$api.post(global.apiUrls.post65797f2a58479, {
          content: this.content,
          is_q: '0',
          pid: this.pid,
          postoffice_id: this.organizationalDetails.aid
        });
        this.content = '';
        this.palcetile = '说点什么'
        this.isfocus = false
        this.pid = '0'
        if (data657914e009af0.data.code != 1) {
          this.$message.info(data657914e009af0.data.msg);
          return
        }
        this.getdetailsFunc()
        this.getcommentListFunc()
      },
      // 收藏
      async collection(action) {

        //请求方法
        //数据验证

        let data657822ffc15db = await this.$api.post(global.apiUrls.post6578266d977f5, {
          postoffice_id: this.organizationalDetails.aid,
          type: '3',
          action: action == 0 ? 1 : 0
        });

        if (data657822ffc15db.data.code != 1) {
          this.$message.info(data657822ffc15db.data.msg);
          return
        }
        this.getdetailsFunc()
      },
      //点击关注取消
      async clickArticleFunc(action) {

        //请求方法
        //数据验证

        let data657822ffc15db = await this.$api.post(global.apiUrls.post657822ffc15db, {
          user_id_2: this.organizationalDetails.user_id,
          action: action == 0 ? '1' : '0'
        });

        if (data657822ffc15db.data.code != 1) {
          this.$message.info(data657822ffc15db.data.msg);
          return
        }
        this.getdetailsFunc()
      },
      //获取组局详情
      async getdetailsFunc() {
        //请求方法
        //数据验证

        let dataorganizationalDetails = await this.$api.get(global.apiUrls.post65796a945f387, {
          aid: this.aid,
          lat: this.address.latitude,
          lng: this.address.longitude,
          // #ifdef H5
          h5: '1'
          // #endif

        });

        if (dataorganizationalDetails.data.code != 1) {
          this.$message.info(dataorganizationalDetails.data.msg);
          return
        }
        let infoorganizationalDetails = dataorganizationalDetails.data;
        this.organizationalDetails = infoorganizationalDetails.data

      },
      //获取评论列表
      getcommentListFunc() {
        this.minixPagingListsApi = global.apiUrls.post65797315eddf6;
        this.pageingListApiMethod = 'get';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {
          postoffice_id: this.aid
        }
        this.listData = [];
        this.commentList = this.listData;
        this.pagingListToggle();

      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      }
    }
  };
</script>
<style lang="scss" scoped>
  .upload {
    width: 750rpx;
    position: fixed;
    bottom: 0;
    left: 0;
    height: 100rpx;
    background-color: #FFFFFF;

    .upload_am {
      height: 100rpx;
      width: 50%;
      background-color: rgba(249, 228, 195, 1);
      color: #333333;
      line-height: 100rpx;
      text-align: center;
    }

    .upload_ios {
      width: 50%;
      height: 100rpx;
      background-color: #6450EB;
      color: #FFFFFF;
      line-height: 100rpx;
      text-align: center;
    }
  }

  .postquestionsDetails_fd3_0_c1_c0_c1 {
    font-size: 24rpx;
    font-weight: 400;
    color: #333;
  }

  .postquestionsDetails_fd3_0_c1_c0_c0 {
    width: 102rpx;
    height: 102rpx;
    border-radius: 100rpx;
    margin: 0rpx 0rpx 16rpx 0rpx;
  }

  .postquestionsDetails_fd3_0_c1 {
    padding: 0rpx 0rpx 58rpx 0rpx;
  }

  .postquestionsDetails_fd3_0_c0_c2_c0 {
    width: 32rpx;
    height: 32rpx;
    border-radius: 20rpx 20rpx 20rpx 20rpx;
  }

  .postquestionsDetails_fd3_0_c0_c2 {
    margin: 0rpx 2rpx 0rpx 0rpx;
  }

  .postquestionsDetails_fd3_0_c0_c1_c0 {
    font-size: 32rpx;
    font-weight: 700;
    color: #333;
    margin: 0rpx 16rpx 0rpx 16rpx;
  }

  .postquestionsDetails_fd3_0_c0_c1 {
    padding: 40rpx 0rpx 48rpx 0rpx;
  }

  .postquestionsDetails_fd3_0_c0_c0 {
    width: 40rpx;
  }

  .postquestionsDetails_fd3_0_c0 {
    padding: 0rpx 13rpx 0rpx 0rpx;
  }

  .postquestionsDetails_fd3_0 {
    background: #fff;
    background-size: 100% auto !important;
    border-radius: 24rpx 24rpx 0rpx 0rpx;
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: rgba(248, 248, 248, 1);
    background-size: 100% auto;
  }

  .organizationalDetails_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .organizationalDetails_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .organizationalDetails_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .organizationalDetails_fd0_0_c0 {
    width: 120rpx;
  }

  .organizationalDetails_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .organizationalDetails_flex_1 {
    padding: 20rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd1_0_c4_c0 {
    background: rgba(100, 80, 235, 1);
    border-radius: 44rpx;
    width: 686rpx;
    line-height: 80rpx;
    font-size: 32rpx;
    color: #fff;

    &.active {
      background: #f8f8f8;
    }
  }

  .organizationalDetails_fd1_0_c4_c0s_can {
    border: 1px solid rgba(100, 80, 235, 1);
    background: rgba(255, 255, 255, 1);
    border-radius: 44rpx;
    width: 686rpx;
    line-height: 80rpx;
    font-size: 32rpx;
    color: rgba(100, 80, 235, 1);
    // margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd1_0_c4_c0s {
    background: #f8f8f8;
    border-radius: 44rpx;
    width: 686rpx;
    line-height: 80rpx;
    font-size: 32rpx;
    color: #666;
  }

  .organizationalDetails_fd1_0_c3_c3_c0_c2 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 32rpx;
    margin: 0rpx 20rpx 0rpx 20rpx;
  }

  .organizationalDetails_fd1_0_c3_c2 {
    margin: 14rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd1_0_c3_c1_c0_c1 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 32rpx;

  }

  .organizationalDetails_fd1_0_c3_c1_c0_c0 {
    width: 40rpx;
    height: 40rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 10rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd1_0_c3_c1 {
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd1_0_c3_c0_c0 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 42rpx;
  }

  .organizationalDetails_fd1_0_c3 {
    background: rgba(248, 248, 248, 1);
    margin: 24rpx 0rpx 0rpx 0rpx;
    border-radius: 16rpx;
    background-size: 100% auto;
    padding: 24rpx;
  }

  .organizationalDetails_fd1_0_c2_c0_c0 {
    color: #3A86FE;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .organizationalDetails_fd1_0_c2_c0 {
    background: rgba(58, 134, 254, 0.1);
    padding: 2rpx 10rpx 2rpx 10rpx;
    border-radius: 4rpx;
    background-size: 100% auto;
    margin: 0rpx 10rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd1_0_c2 {
    margin: 10rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd1_0_c1_c0 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 700;
    line-height: 42rpx;
  }

  .organizationalDetails_fd1_0_c1 {
    margin: 40rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd1_0_c0_c1 {
    background: rgba(100, 80, 235, 1);
    border-radius: 50rpx;
    width: 112rpx;
    line-height: 56rpx;
    font-size: 24rpx;
    color: #fff;
  }

  .organizationalDetails_fd1_0_c0_c1s {
    background: #eee;
    border-radius: 50rpx;
    width: 112rpx;
    line-height: 56rpx;
    font-size: 24rpx;
    color: #333;
  }

  .organizationalDetails_fd1_0_c0_c0_c1_c1_c1 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 32rpx;
    margin: 0rpx 0rpx 0rpx 0;
  }

  .organizationalDetails_fd1_0_c0_c0_c1_c1_c0 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 32rpx;
    // margin-left: 24rpx;
    width: 150rpx;
    text-align: right !important;
  }

  .organizationalDetails_fd1_0_c0_c0_c1_c1 {
    margin: 6rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd1_0_c0_c0_c1_c0 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 700;
    line-height: 32rpx;
  }

  .organizationalDetails_fd1_0_c0_c0_c0 {
    width: 80rpx;
    height: 80rpx;
    border-radius: 50%;
    margin: 0rpx 20rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd1_0 {
    background: rgba(255, 255, 255, 1);
    background-size: 100% auto;
    margin: 0rpx 0rpx 20rpx 0rpx;
    padding: 32rpx 32rpx 40rpx 32rpx;
  }

  .organizationalDetails_flex_2 {
    padding: 32rpx 32rpx 0rpx 32rpx;
  }

  .organizationalDetails_fd2_1_c1_c5_c4 {
    width: 18rpx;
    height: 10rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 0rpx 0rpx 8rpx;
  }

  .organizationalDetails_fd2_1_c1_c5_c1 {
    color: #666666;
    font-size: 26rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .organizationalDetails_fd2_1_c1_c5_c0 {
    background: rgba(153, 153, 153, 1);
    width: 36rpx;
    height: 1rpx;
    transform: scaleY(0.5);
    margin: 0rpx 18rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd2_1_c1_c4_c0_c1_c0_c2 {
    width: 32rpx;
    height: 32rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 0rpx 0rpx auto;
  }

  .organizationalDetails_fd2_1_c1_c4_c0_c1_c0_c1 {
    background: rgba(255, 137, 46, 0.1);
    color: #FF892E;
    font-size: 22rpx;
    font-weight: 700;
    line-height: 22rpx;
    padding: 2rpx 8rpx 2rpx 8rpx;
    border-radius: 4rpx;
    background-size: 100% auto;
  }

  .organizationalDetails_fd2_1_c1_c4 {
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd2_1_c1_c3_c1_c0_c1 {
    color: #999999;
    font-size: 20rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .organizationalDetails_fd2_1_c1_c3_c1_c0_c0 {
    width: 32rpx;
    height: 32rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 4rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd2_1_c1_c2_c0 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .organizationalDetails_fd2_1_c1_c2 {
    margin: 16rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd2_1_c1_c1_c1 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .organizationalDetails_fd2_1_c1_c1_c0 {
    margin: 0rpx 12rpx 0rpx 0rpx;
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .organizationalDetails_fd2_1_c1_c1 {
    margin: 4rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd2_1_c1_c0_c1 {
    background: rgba(100, 80, 235, 0.1);
    color: rgba(100, 80, 235, 1);
    font-size: 22rpx;
    font-weight: 700;
    line-height: 22rpx;
    padding: 2rpx 8rpx 2rpx 8rpx;
    border-radius: 4rpx;
    background-size: 100% auto;
  }

  .organizationalDetails_fd2_1_c1_c0_c0 {
    color: #333333;
    font-size: 24rpx;
    font-weight: 700;
    line-height: 32rpx;
    margin: 0rpx 8rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd2_1_c0 {
    width: 70rpx;
    height: 70rpx;
    border-radius: 50%;
    margin: 0rpx 16rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd2_1 {
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd2_0_c0 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 700;
    line-height: 32rpx;
  }

  .organizationalDetails_flex_3 {
    background: rgba(255, 255, 255, 1);
    width: 540rpx;
    border-radius: 16rpx;
    background-size: 100% auto;
  }

  .organizationalDetails_fd3_0_c2_c0 {
    color: #6450EB;
    font-size: 32rpx;
    font-weight: 700;
    line-height: 42rpx;
  }

  .organizationalDetails_fd3_0_c2 {
    border-top: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
    margin: 40rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd3_0_c1_c1 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 52rpx;
  }

  .organizationalDetails_fd3_0_c1_c0 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 700;
    line-height: 52rpx;
  }

  .organizationalDetails_fd3_0_c0_c0 {
    width: 180rpx;
    height: 180rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd4_0_c2_c1 {
    background: rgba(255, 255, 255, 1);
    font-size: 32rpx;
    color: rgba(100, 80, 235, 1);
    width: 270rpx;
    height: 101rpx;
    line-height: 101rpx;
    font-weight: 500;
  }

  .organizationalDetails_fd4_0_c2_c0 {
    border-right: 1px solid #eee;
    background: #fff;
    font-size: 32rpx;
    color: rgba(153, 153, 153, 1);
    width: 270rpx;
    height: 101rpx;
    line-height: 101rpx;
    font-weight: 400;
  }

  .organizationalDetails_fd4_0_c2 {
    border-top: 1px solid #eee;
    margin: 51rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd4_0_c1 {
    line-height: 44rpx;
    font-size: 28rpx;
    font-weight: 500;
    color: #333333;
    text-align: center;
    margin: 32rpx 40rpx 0rpx 40rpx;
  }

  .organizationalDetails_fd4_0_c0 {
    line-height: 44rpx;
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    margin: 40rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd4_0 {
    background: #fff;
    width: 540rpx;
    background-size: 100% auto !important;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
  }

  .organizationalDetails_flex_5 {
    background: rgba(255, 255, 255, 1);
    width: 750rpx;
    min-height: 98rpx;
    overflow: hidden;
    z-index: 10;
    bottom: 0;
    box-shadow: 0rpx -1rpx 0rpx 1rpx rgba(0, 0, 0, 0.08);
    background-size: 100% auto;
    // padding-bottom: 32rpx;
  }

  .organizationalDetails_fd5_0_c1_c0_c1 {
    color: #999999;
    font-size: 20rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .organizationalDetails_fd5_0_c1_c0_c0 {
    width: 44rpx;
    height: 44rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd5_0_c1_c0 {
    margin: 0rpx 48rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd5_0_c0 {
    background: rgba(248, 248, 248, 1);
    margin: 0rpx 32rpx 0rpx 0rpx;
    padding: 16rpx 32rpx 16rpx 32rpx;
    border-radius: 40rpx;
    background-size: 100% auto;
  }

  .organizationalDetails_fd5_0 {
    padding: 12rpx 36rpx 32rpx 32rpx;
  }

  .btnssss {
    width: 110rpx;
    height: 60rpx;
    line-height: 60rpx;
    background-color: #6450eb;
    border-radius: 33rpx;
    text-align: center;
  }
</style>
